package com.work.vo.transport;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.Func;

/**
 * 机械VO
 *
 * @author ：dujianyu
 * @since ：Created in 2024/5/20 14:37
 */
@Data
public class AssignMachineVO {

    /** ID */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "ID",notes = "")
    private Long machineId ;

    /** teamId */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "teamId",notes = "")
    private Long teamId ;

    @ApiModelProperty(value = "作业队名称")
    private String teamName;

    @ApiModelProperty(value = "名称")
    private String machineName;

    @ApiModelProperty(value = "名称")
    private String fullMachineName;

    public String getFullMachineName() {
        if (Func.isNull(teamName)) {
            return  machineName;
        }
        return teamName + " " + machineName;
    }

}
